<html>
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8">.
    </head>
    <body>
        <style>
            table { border-collapse: collapse; width: 100%; border: 1px solid #000; margin-bottom: 30px; }
            table td { border-left: 1px solid #000; }
            table > thead > tr > td { border-bottom: 1px solid #000; }
            table.centered tbody tr td { text-align: center; }
            table.centered thead tr td { text-align: center; font-weight: bold; }
            tr.five-percent td { width: 6%; }
            .udef { background: #cdcdcd; }
            .header { background: #ededed; }
        </style>
        <table class="centered">
            <thead>
                <tr style="background: #b7d2ff;">
                    <td rowspan="2">Carrera</td>
                    <td colspan="2">Alumnos</td>
                    <td colspan="9">Alumnos por edad en años cumplidos al día 30 de junio de 2013</td>
                    <td colspan="2">Ingresantes</td>
                </tr>
                <tr class="five-percent" style="background: #b7d2ff;">
                    <td>Total</td>
                    <td>Varones</td>
                    <td>18</td>
                    <td>19</td>
                    <td>20</td>
                    <td>21</td>
                    <td>22</td>
                    <td>23</td>
                    <td>24</td>
                    <td>25 a 29</td>
                    <td>Más de 30</td>
                    <td>Total</td>
                    <td>Varones</td>
                </tr>
            </thead>
            <tbody>
                <?php foreach ($datos as $dato): ?>
                    <tr>
                        <td><?php echo $dato['carrera'] ?></td>
                        <td><?php echo $dato['total'] ?></td>
                        <td><?php echo $dato['varones'] ?></td>
                        <td><?php echo $dato[18] ?></td>
                        <td><?php echo $dato[19] ?></td>
                        <td><?php echo $dato[20] ?></td>
                        <td><?php echo $dato[21] ?></td>
                        <td><?php echo $dato[22] ?></td>
                        <td><?php echo $dato[23] ?></td>
                        <td><?php echo $dato[24] ?></td>
                        <td><?php echo $dato[25] ?></td>
                        <td><?php echo $dato[30] ?></td>
                        <td><?php echo $dato['i_total'] ?></td>
                        <td><?php echo $dato['i_varones'] ?></td>
                    </tr>
                <?php endforeach ?>
            </tbody>
        </table>
    </body>
</html>